package structural.decorator;

// 鸡蛋类
public class Egg extends Garnish{

    public Egg(float price, String desc, FastFood fastFood) {
        super(price, desc, fastFood);
    }

    // 具体父类实现的费用 + 自己本身的费用
    @Override
    public float cost() {
        return getFastFood().cost() + getPrice();
    }
}
